home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / MODULA_2 / 2394.ZIP / M2TOOLS1.ZIP / INOUT2.DEF < prev    next >
Text File  |  1990-03-01  |  1KB  |  57 lines

  1. DEFINITION MODULE InOut2;
  2.  
  3.   CONST
  4.     F1          = 59;
  5.     F2          = 60;
  6.     F3          = 61;
  7.     F4          = 62;
  8.     F5          = 63;
  9.     F6          = 64;
  10.     F7          = 65;
  11.     F8          = 66;
  12.     F9          = 67;
  13.     F10         = 68;
  14.     RtTab       = 9;
  15.     LtTab       = 15;
  16.     LtArrow     = 75;
  17.     RtArrow     = 77;
  18.     UpArrow     = 72;
  19.     DnArrow     = 80;
  20.     Home        = 71;
  21.     End         = 79;
  22.     PgUp        = 73;
  23.     PgDn        = 81;
  24.     CtrlLtArrow = 115;
  25.     CtrlRtArrow = 116;
  26.     CtrlHome    = 119;
  27.     CtrlEnd     = 117;
  28.     CtrlPgUp    = 132;
  29.     CtrlPgDn    = 118;
  30.     ESC         = 27;
  31.     Ins         = 82;
  32.     Del         = 83;
  33.     BkSpace     = 8;
  34.     Return      = 13;
  35.  
  36.  
  37.   PROCEDURE GetKey (VAR Ch       : CARDINAL;
  38.             VAR NormChar : BOOLEAN);
  39.  
  40.     (*  This procedure will read a key.  If it is not a normal key, ie F1 then
  41.         NormChar will be FALSE and the scan code returned in Ch.
  42.  
  43.     Normal ASCII characters will have NormChar = TRUE and the ASCII code
  44.     returned in Ch *)
  45.  
  46.  
  47.   PROCEDURE GetReply (CharRange : ARRAY OF CHAR) : CHAR;
  48.  
  49.     (*     Enter the range, e.g. "YN".  If the character entered matches any
  50.     of the CharRange then it is returned.  Only a correct ranged reply
  51.     will allow exit of this procedure.
  52.  
  53.     Please note if <RETURN> is pressed then the last character of the
  54.     CharRange is taken as the default reply *)
  55.  
  56.     
  57. END InOut2.